import Vue from 'vue'
import VueRouter from 'vue-router'
// @是src文件的简写
import Home from '@/views/home.vue'
import Persion from '../views/persion.vue'
import NewsInfo from '../views/newsinfo.vue'
import About from '../views/About.vue'
import Shouye from '../views/shouye.vue'

Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    redirect:"/shouye"
  },
  {
    path:'/home',
    component:Home
  },
  {
    path:'/persion',
    component:Persion
  },
  {
    path:'/NewsInfo/:id',
    name:'NewsInfo',
    component:NewsInfo
  },
  {
    path:'/about',
    name:"About",
    component:About
  },
  {
    path:"/shouye",
    component:Shouye
  }
]

const router = new VueRouter({
  routes
})

export default router
